$:.unshift File.join(File.dirname(__FILE__))
require 'test_helper'

class TestTurn < Test::Unit::TestCase
  
  def test_turn_over_no_rolls
    t = Yahtzee::Turn.new
    assert !t.over?
  end

  def test_turn_over_one_roll
    t = Yahtzee::Turn.new
    t.roll
    assert !t.over?
  end

  def test_turn_over_two_rolls
    t = Yahtzee::Turn.new
    t.roll
    t.roll
    assert !t.over?
  end

  def test_turn_over_three_rolls
    t = Yahtzee::Turn.new
    t.roll
    t.roll
    t.roll
    assert t.over?
  end

  def test_turn_over_four_rolls
    t = Yahtzee::Turn.new
    t.roll
    t.roll
    t.roll
    assert_raise RuntimeError do 
      t.roll
    end
  end
  
end

